<template>
  <sc-grid ai="center" col="auto 1fr auto" col-gap="30">
    <sc-text color="#3D3D3D" size="26" text="查询"></sc-text>
    <glo-input
      v-model="keyword"
      show-scan
      @search="search"
      placeholder="按名称/编码/厂家/仓库搜索"></glo-input>
    <sc-flex ai="center" col-gap="15" @click="handlerFilter">
      <sc-text color="#555" size="22" text="筛选"></sc-text>
      <sc-image
        height="26"
        src="/static/imgs/ic_shaixuan.png"
        width="26"></sc-image>
    </sc-flex>
  </sc-grid>
</template>

<script setup>
const keyword = ref("");
const emits = defineEmits(["filter", "search"]);
const handlerFilter = () => {
  emits("filter");
};
const search = () => {
  emits("search", keyword.value);
};
</script>
